Release 10.1A: OpenEdge Development:
ProDataSets
Accessing a member buffer of a ProDataSet
Temp-tables in a ProDataSet are normally accessed through their buffers. This is largely because, while a temp-table can possibly be a part of more than one ProDataSet, a buffer must be specifically associated with a single ProDataSet. The ProDataSet accesses its member temp-tables through the buffers for them. In some cases, as explained here, you can use either a temp-table handle or its buffer handle to access the table, but in general all access is through the buffer. This is important to keep in mind, especially because each static temp-table has by default a buffer of the same name, so the distinction can be confusing. Always remember that
TEMP-TABLE ttOrder:HANDLEandBUFFER ttOrder:HANDLEare two different handles that point to different, though related, objects. This section explains the ProDataSet methods and attributes that give you access to the buffers of a ProDataSet, and the buffer attributes and methods for those buffers.In order to access the member buffers in a ProDataSet, you use the
GET-BUFFER-HANDLEmethod, which accepts either a numeric index or a buffer name, as shown in the following syntax:
In this method:
GET-BUFFER-HANDLEreturns the buffer handle of the member buffer, or the Unknown value (?) if the buffer cannot be found.To find out how many temp-tables there are in a ProDataSet, you use the
NUM-BUFFERSattribute:
Of course, if the ProDataSet definition is local to the procedure seeking the buffer handle, you can simply get the handle directly if you know its name without going through the ProDataSet, as shown:
For example, the
buffer-name-expressionform is useful if you have only the handle to the ProDataSet available and need to locate one of its buffers by name to act on it, to set a callback procedure, or to attach a Data-Source.The buffer handle provides the same access to the data in the temp-table as any other usage of a buffer handle.
The member buffers of a ProDataSet point back to the ProDataSet handle using the
DATASETattribute. For example:
This returns the ProDataSet object handle of a member buffer object.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |